package fi.piet.ec2.service;

import java.util.Collection;

import org.apache.wicket.spring.injection.annot.SpringBean;

import fi.piet.ec2.dao.EmployeeDao;
import fi.piet.ec2.department.Department;
import fi.piet.ec2.employee.Employee;

public class EmployeeServiceImpl implements EmployeeService {

	@SpringBean
	private EmployeeDao employeeDao;
	
	@Override
	public Collection<Employee> findEmployeesForADepartment(Department department) {
		return employeeDao.findEmployeesForADepartment(department.getId());
	}

	@Override
	public Collection<Employee> getAllEmployees() {
		paska();
		return employeeDao.getAllEmployees();
	}

	private void paska() {
		// TODO Auto-generated method stub
		throw new UnsupportedOperationException("not implemented yet...");
		
	}

	@Override
	public void storeEmployee(Employee employee) {
		employeeDao.storeEmployee(employee);
	}
	
	public void setEmployeeDao(EmployeeDao employeeDao) {
		this.employeeDao = employeeDao;
	}
}
